clear;
clc;
figure('position',[0.4,100,900,550])%确定图片的位置和大小，[x y width height]
x=[8,10,12,14];
%4
Y_4=[3.272,15.755,71.592,395.276];
%6
Y_6=[4.36,21,95.436,526.974];
%8
Y_8=[5.452,26.27,119.292,658.924];
%10
Y_10=[6.652,31.755,143.202,790.461];
%12
Y_12=[7.362,36.755,167.016,922.208];

values_4 = spcrv([[x(1) x x(end)];[Y_4(1) Y_4 Y_4(end)]],3);
values_6 = spcrv([[x(1) x x(end)];[Y_6(1) Y_6 Y_6(end)]],3);
values_8 = spcrv([[x(1) x x(end)];[Y_8(1) Y_8 Y_8(end)]],3);
values_10 = spcrv([[x(1) x x(end)];[Y_10(1) Y_10 Y_10(end)]],3);
values_12 = spcrv([[x(1) x x(end)];[Y_12(1) Y_12 Y_12(end)]],3);
plot(values_4(1,:),values_4(2,:),values_6(1,:),values_6(2,:),values_8(1,:),values_8(2,:),values_10(1,:),values_10(2,:),values_12(1,:),values_12(2,:))

%修改横坐标名称、字体
set(gca,'FontSize',20,'FontName','Times New Roman');
%set(gca,'XTick',{0.2,0.4,0.5,0.7,0.9});  
ylim([0,1000]);      %y轴刻度
%修改x,y轴标签
ylabel('\fontname{宋体}\fontsize{14}计算开销（秒）');
xlabel('\fontname{宋体}\fontsize{14}数据集'); 
%修改图例
legend({'\fontname{宋体}4方','\fontname{宋体}6方','\fontname{宋体}8方','\fontname{宋体}10方','\fontname{宋体}12方'},'FontSize',11);
